package com.example.mybatisplusdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.mybatisplusdemo.model.domain.Favorite;
import com.example.mybatisplusdemo.model.dto.FavoriteDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lxp
 * @since 2025-07-04
 */
public interface FavoriteMapper extends BaseMapper<Favorite> {

    Page<FavoriteDTO> listFavoriteByUserId(Page<FavoriteDTO> page, @Param("userId") Long userId);

    List<Favorite> selectFavoriteListByUserId(@Param("userId") Long userId);

    void insertFavoriteStore(@Param("favoriteList") List<Favorite> favoriteList);

}
